using System; 
using System.Collections.Generic; 
using System.Text; 
using FluentNHibernate.Mapping;
using Managistics.Model; 

namespace Managistics.Model.Mappings {
    
    
    public class ItemTypeMap : ClassMap<ItemType> {
        
        public ItemTypeMap() {
			Table("ITEM_TYPE");
			LazyLoad();
			Id(x => x.ItemTypeId).GeneratedBy.Assigned().Column("ITEM_TYPE_ID");
			References(x => x.Catalog).Column("CATALOG_ID");
			Map(x => x.ItemTypeName).Column("ITEM_TYPE_NAME").Not.Nullable().Length(50);
			Map(x => x.DescriptionItemType).Column("DESCRIPTION_ITEM_TYPE").Length(2048);
			HasMany(x => x.Items).KeyColumn("ITEM_TYPE_ID");
        }
    }
}
